import static org.testng.Assert.*;

/**
 * Created by ASUS on 2017/4/17.
 */
public class AnimalTest {
    public static void main(String[] args){
    Animal[] arr = {new Dog(),new Cat(),new Cat(),new Dog()};
    for(int i=0; i<arr.length;i++)
        getInfo(arr[i]);
    }

public static void getInfo(Animal a){
        System.out.println(a.toString());
    }
}